﻿using System;

namespace IWMAG.Core.EnhancedProperties.PropertyNodes
{
    internal class SetNode<T> : PropertyNode<T>
    {
        private T Value { get; set; }
        public SetNode(int priority, T startingVal)
            : base(priority)
        {
            this.Value = startingVal;
        }
        public void SetNodeValue(T value)
        {
            this.Value = value;
            Previous.SuccessorChanged(this.Value);
        }

        public override T GetNodeValue()
        {
            return Value;
        }

        public override void Dispose()
        {
            base.Dispose();

        }


        public override void SuccessorChanged(T value) { }
    }
}
